<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<title>讨论板</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Loading Bootstrap1 -->
    	<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/css/icons.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/css/style1.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/css/style2.css" />
		
        <link href="<%=path%>/page/front/disc/bianji/font-awesome.css" rel="stylesheet">
	 	<script type="text/javascript" src="<%=path%>/page/front/disc/bianji/src/js/libs/jquery-1.10.2.min.js"></script>
		<!-- Loading Bootstrap1 -->
    	<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/bianji/style.css">
        <link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/bianji/src/js/jquery.notebook.css">
        <link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/bianji/css/default.css" />
        <link rel="stylesheet" type="text/css" href="<%=path%>/page/front/disc/bianji/css/component.css" />
        <script src="<%=path%>/page/front/disc/bianji/js/modernizr.custom.js"></script>
        <script src="<%=path%>/page/front/them/reconnecting-websocket.js"></script>
		
		<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="<%=path%>/page/front/disc/js/html5shiv.js"></script>
	      <script src="<%=path%>/page/front/disc/js/respond.min.js"></script>
	    <![endif]-->
		 <style type="text/css">
		 	body{
		 		width:100%;
		 		height:100%;
		 	}
            #center{
            	margin-top:30px;
            }
            #top{
            	width:35%;
            	height:50%;
            	margin:15px auto;
            	color:#fff;
            	line-height:20px;
            }
            #botton{
            	width:60%;
            	margin:0 auto;
            	text-align:center;
            }
            .user{
            	width:90px;
            	height:120px;
            	margin:5px;
            	float:left;
            }
            #image{
            	width:80px;
            	height:80px;
            	margin:0 auto;
            }
            #image img{
            	width:80px;
            	height:80px;
            	-webkit-border-radius:80px;
              	-moz-border-radius:80px;
              	border-radius:80px;
            }
            #uname{
            	width:80px;
            	height:20px;
            	margin:5px auto;
            	text-align:center;
            	line-heigt:20px;
            	color:#fff;
            	font-size:14px;
            }
            #tit{
            	height:30px;
            	line-height:20px;
            	font-size:14px;
            	color:#c55500;
            }
            .sp1{
            	float:left;
            }
            .sp2{
            	float:right;
            	text-align:right;
            }
            #fanhui{
            	width:80px;
            	height:80px;
            	position:absolute;
            	left:50px;
            	bottom:50px;
            }
             #fanhui a{
             	display:block;
             	width:80px;
             	height:80px;
             	color:#fff;
             	text-align:center;
             	line-height:80px;
             	font-size:20px;
             	font-family: "楷体","楷体_GB2312";
             }
             #fanhui a:hover{
             	text-decoration:none;
             }
        </style>
	</head>
<body> 
	<div id="center">
		<div id="top">${one.drContent}</div>
		<div id="botton"><div id="tit"><span class="sp1">已加入</span><span class="sp2">
		<c:if test="${jiaru==-1}"><a href="#" onclick="xianlogin();">点击加入</a></c:if>
		<c:if test="${jiaru==0}"><a href="#" onclick="xianadd(${one.drId});">点击加入</a></c:if>
		<c:if test="${jiaru==1}"><a href="#" onclick="xiandel(${one.drId});">点击退出</a></c:if></span></div>
		<c:forEach items="${one.uli}" var="all">
			<div class="user">
				<div id="image">
					<img  title="" src="<c:if test="${all.image.imLoclhost!=null}">../../page/upload/images/${all.image.imLoclhost}</c:if>
					<c:if test="${all.image.imLoclhost==null}">../../page/upload/images/123456.jpg</c:if>
					"/>
				</div>
				<div id="uname">${all.uName}</div>				
			</div>
		</c:forEach>
		</div>
	</div>
	
	<div id="fanhui">
		<a href="javascript:void(0);" onclick="history.go(-1)">返回</a>
	</div>
	<script src="<%=path%>/page/front/disc/js/jquery-1.8.3.min.js"></script>
   	<script src="<%=path%>/page/front/disc/js/bootstrap.min.js"></script>
	
      <script type="text/javascript">
      		function xianadd(drId){
      			$.post("../../fdis/xianadd.json?id="+drId,function(json){
      				if(json==1){
      					alert("您已成功加入！");
						location.reload();
      				}else{
      					alert("加入失败！");
      				}
      			});
      		};
      		
      		function xianlogin(){
				alert("请先登录，在加入！");
				window.history.back(-1);
		        //location.href='../../';
      		};
      		
      		function xiandel(drId){
      			$.post("../../fdis/xiandel.json?id="+drId,function(json){
      				if(json==1){
      					alert("您已成功退出！");
						location.reload();
      				}else{
      					alert("退出失败！");
      				}
      			});
      		};
			   
		</script>
	</body>
</html>  